package com.zfk.transaction.service.impl;

import com.zfk.transaction.entity.Dynamic;
import com.zfk.transaction.mapper.DynamicMapper;
import com.zfk.transaction.service.DynamicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DynamicServiceImpl implements DynamicService {

    @Autowired
    private DynamicMapper mapper;

    @Override
    public List<Dynamic> getByIsHot(String is_hot) {
        List<Dynamic> hot = mapper.getByIsHot(is_hot);
        return hot;
    }

    @Override
    public int addDynamic(Dynamic dynamic) {
        int result = mapper.addDynamic(dynamic);
        return result;
    }

    @Override
    public int deleteDynamic(int post_id) {
        return mapper.deleteDynamic(post_id);
    }

    @Override
    public int updateDynamic(Dynamic dynamic) {
        return mapper.updateDynamic(dynamic);
    }
}
